package org.jeecg.modules.exam.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.exam.entity.ExamTestQuestions;
import org.jeecg.modules.exam.mapper.ExamTestQuestionsMapper;
import org.jeecg.modules.exam.service.IExamTestQuestionsService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.Map;

/**
 * @Description: 试题
 * @Author: jeecg-boot
 * @Date:   2023-08-12
 * @Version: V1.0
 */
@Service
public class ExamTestQuestionsServiceImpl extends ServiceImpl<ExamTestQuestionsMapper, ExamTestQuestions> implements IExamTestQuestionsService {

    @Override
    public IPage<ExamTestQuestions> queryPageList(ExamTestQuestions examTestQuestions, Integer pageNo, Integer pageSize, Map<String, String[]> queryMapper) {
        QueryWrapper<ExamTestQuestions> queryWrapper = QueryGenerator.initQueryWrapper(examTestQuestions, queryMapper);
        Page<ExamTestQuestions> page = new Page<ExamTestQuestions>(pageNo, pageSize);
        IPage<ExamTestQuestions> pageList = page(page, queryWrapper);
        return pageList;
    }
}
